Term Rewriting Meets Aspect-Oriented Programming

نویسندگان

  • Paul Klint
  • Tijs van der Storm
  • Jurgen J. Vinju
چکیده

We explore the connection between term rewriting systems (TRS) and aspect-oriented programming (AOP). Term rewriting is a paradigm that is used in fields such as program transformation and theorem proving. AOP is a method for decomposing software, complementary to the usual separation into programs, classes, functions, etc. An aspect represents code that is scattered across the components of an otherwise orderly decomposed system. Using AOP, such code can be modularized into aspects and then automatically weaved into a system. Aspect weavers are available for only a handful of languages. Term rewriting can offer a method for the rapid prototyping of weavers for more languages. We explore this claim by presenting a simple weaver implemented as a TRS. We also observe that TRS can benefit from AOP. For example, their flexibility can be enhanced by factoring out hardwired code for tracing and logging rewrite rules. We explore methods for enhancing TRS with aspects and present one application: automatically connecting an interactive debugger to a language specification.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Combining Aspect-Oriented and Strategic Programming

Properties such as logging, persistence, debugging, tracing, distribution, performance monitoring and exception handling occur in most programming paradigms and are normally very difficult or even impossible to modularize with traditional modularization mechanisms because they are cross-cutting. Recently, aspect-oriented programming has enjoyed recognition as a practical solution for separating...

متن کامل

Aspects for Graph Grammars

Aspect-oriented programming (AOP) is an extension to the object oriented paradigm that aims to provide better modularity for code that is usually scattered across an object-oriented system such as logging, authentication and distributed object handling. Aspect weaving is a novel way to compose systems, focusing on the integration of system-wide policies through pattern-action rules. While there...

متن کامل

Modeling and Reasoning over Distributed Systems using Aspect-Oriented Graph Grammars

Aspect-orientation is a relatively new paradigm that introduces abstractions to modularize the implementation of system-wide policies. It is based on a composition operation, called aspect weaving, that implicitly modifies a base system by performing related changes within the system modules. Aspect-oriented graph grammars (AOGG) extend the classic graph grammar formalism by defining aspects as...

متن کامل

Implementing aspect-oriented programming constructs as modular language extensions

Extensible programming languages and their compilers are experimental systems that use highly modular specifications of languages and language extensions in order to allow a variety of language features to be easily imported, by the programmer, into his or her programming environment. Our framework for extensible languages is based on higher-order attribute grammars extended with a mechanism ca...

متن کامل

Proofs of the convergence of the rewriting system for the weaving of aspects in the AO - PFA language ∗

AO-PFA is an aspect oriented feature modelling language. This report discusses several theoretical issues regarding the weaving process of AO-PFA. The weaving of aspects is to extract subterms from product family terms in the base specification, and then to replace the extracted subterm (selected join points) by another term (advice). The problem of extracting a subterm from another term is rel...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005